package teamGiga.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import teamGiga.bean.CartBean;
import teamGiga.bean.MovieBean;
import teamGiga.dao.CartDao;
import action.servlet.ActionForWard;

public class VodListAction extends Action{

	private String path;
	private boolean redirect;
	
	
	
	public VodListAction() {
		super();
	}

	public VodListAction(String path, boolean redirect) {
		super();
		this.path = path;
		this.redirect = redirect;
	}



	@Override
	public ActionForWard execute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		
		
		
		try {
			
			List<MovieBean> list = CartDao.selectCart();
			
			request.setAttribute("movie", list);
			System.out.println(list);
			//System.out.println(CartDao.selectCart().toString());
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		
	
		
		return new ActionForWard(path,redirect);

	}
	
	

}
